package admin.DAO;

import java.sql.SQLException;
import java.util.ArrayList;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import admin.DTO.ComponentDTO;
import admin.DTO.MachineDTO;

public class ExcelDAOImpl extends SqlMapClientDaoSupport implements ExcelDAO {

	@Override
	public ArrayList<ComponentDTO> componentKind() throws SQLException {
		return (ArrayList<ComponentDTO>) this.getSqlMapClient().queryForList("ex.componentKind");
	}

	@Override
	public ArrayList<ComponentDTO> isFaultN(ComponentDTO dto) throws SQLException {
		return (ArrayList<ComponentDTO>) this.getSqlMapClient().queryForList("ex.isFaultN", dto);
	}

	@Override
	public ComponentDTO count(ComponentDTO dto) throws SQLException {
		return   (ComponentDTO) this.getSqlMapClient().queryForObject("ex.count", dto);
	}

	@Override
	public ArrayList<MachineDTO> machine(MachineDTO dto) throws SQLException {
		return (ArrayList<MachineDTO>) this.getSqlMapClient().queryForList("", dto);
	}

}
